#include "fermiqcd.h"

int main(int argc, char** argv) {
  define_base_matrices("FERMILAB");
  mdp.open_wormholes(argc,argv);    
  int nc=3;
  int nt=10,nx=10;
  int box[]={nt,nx,nx,nx};
  mdp_lattice lattice(4,box,default_partitioning0,torus_topology,0,2,false);
  gauge_field U(lattice,nc);
  char filename[128];
  mdp_site x(lattice);
  set_cold(U);
  x.set(5,5,5,5);

  for(int mu=0; mu<lattice.ndim; mu++) {
    U(x,mu)=exp(-I*Lambda[mu+1]);
    //    U(x-mu,mu)=exp(+I*Lambda[mu+1]);
  }

  for(int k=0; k<1; k++) {
    mdp << "k=" << k << endl;
    ApeSmearing::smear(U,0.7,20,10);
    sprintf(filename,"test_two_top_blob.%i.vtk",k);
    mdp << "top=" << topological_charge_vtk(U,filename) << endl;
  }
  mdp.close_wormholes();
  return 0;
}
